<%@ page language="java" contentType="text/html; charset=utf-8"	pageEncoding="utf-8"%>
<%@ page language="java" import="java.util.*" %>
<%@ include file="../../common/tag.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>添加用户</title>
<link href="<%=basePath %>/resource/css/frame.css" type=text/css rel=stylesheet>
<script type="text/javascript" src="<%=basePath%>/resource/js/checkForm.js"></script>
<script type="text/javascript" src="<%=basePath%>/resource/js/jquery-1.4.4.min.js"></script>
<SCRIPT LANGUAGE="javascript">
function showMenuTree(){
	window.open("<%=basePath%>/system/menu/menuTree.jsp","newwindow","height=550,width=500,top=200,left=800,toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no,status=no");
}
//重置上级菜单显示内容
function changePName(){
	$("#pName").val("");
}
</SCRIPT>
</head>
<body>
<table cellSpacing=1 cellPadding=3 width="99%" bgColor=#6298e1 border=0>
	   <tr>
	     <td height=25 class="specialTd">
	       	<span class="whiteWord">角色管理：添加角色</span>
	    </td>
	  </tr>
	   <tr>
	    <td  bgColor=#ebf2f9 height=30>
	      <table cellSpacing=0 width="99%" border=0>
		          <tr>
		          	<td align="center"><input type="submit" name="Submit" value="确定">
			<input type="button" name="Submit2" value="返回" onclick="return history.go(-1);" ></td>
		          </tr>
	       </table>
	    </td>
	   </tr>
</table>
<table cellSpacing=1 cellPadding=0 width="99%" border=0>
  <tbody>
  <tr>
    <td height=10></td>
  </tr>
  </tbody>
</table>
<form action="<%=basePath %>/menu/addOrUpdateMenu.action"  method="post" id="menuForm">
<input type="hidden" name="menuId" id="menuId" value="${menuList.get(0).get('ID')}"/>
<table cellSpacing=1 cellPadding=3 width="99%" bgColor=#6298e1 border=0>
	<tr>
		<td bgColor=#ebf2f9>菜单名称</td>
		<td bgColor=#ebf2f9><input type="text" name="menuName" id="menuName" value="${menuList.get(0).get('MENU_NAME')}"/></td>
		<td bgColor=#ebf2f9>URL</td>
		<td bgColor=#ebf2f9 title="格式：/项目上下文/相关action，如：egg/getAllMenu.action"><input type="text" name="menuUrl" id="menuUrl" value="${menuList.get(0).get('MENU_URL')}" size="50"/></td>
	</tr>
	<tr>
		<td bgColor=#ebf2f9>上级菜单</td>
		<td bgColor=#ebf2f9 colspan="3">
			<s:if test="menuList==null">
				<input type="text" name="pName" id="pName" value="无" readonly="readonly"/>
				<input type="hidden" id="paId" name="paId" value="0"/>
			</s:if>
			<s:else>
				<input type="text" name="pName" id="pName" value="${menuList.get(0).get('P_MENU_NAME') }" readonly="readonly"/>
				<input type="hidden" id="paId" name="paId" value="${menuList.get(0).get('P_ID') }"/>
			</s:else>
			<a href="#" onclick="return showMenuTree();">选择</a>
		</td>
	</tr>
	<tr>
		<td colspan="4" class="submitTd">
			<input type="button" name="Submit" value="确定" onclick="return checkMenuForm()">
			<input type="button" name="Submit2" value="返回" onclick="return history.go(-1);" >
		</td>
	</tr>
</table>
</form>
</body>
</html>